package com.example.nick.bodyapplication.jetpack.flow

import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.nick.bodyapplication.Event
import kotlinx.coroutines.flow.MutableSharedFlow
import kotlinx.coroutines.launch

data class Tflow(val count: Int)

class FlowViewModel : ViewModel() {

    val shareFlow2 = MutableSharedFlow<Tflow>()

    var count = 0
    public fun itemTest() {
        viewModelScope.launch {
            shareFlow2.emit(Tflow(++count))
        }
    }
}